<!--
______                            _              _                                     _
| ___ \                          | |            | |                                   | |
| |_/ /___ __      __ ___  _ __  | |__   _   _  | |      __ _  _ __  __ _ __   __ ___ | |
|  __// _ \\ \ /\ / // _ \| '__| | '_ \ | | | | | |     / _` || '__|/ _` |\ \ / // _ \| |
| |  | (_) |\ V  V /|  __/| |    | |_) || |_| | | |____| (_| || |  | (_| | \ V /|  __/| |
\_|   \___/  \_/\_/  \___||_|    |_.__/  \__, | \_____/ \__,_||_|   \__,_|  \_/  \___||_|
                                          __/ |
                                         |___/
  ========================================================
                                           dspstack.com

  --------------------------------------------------------

-->
<!DOCTYPE html>
<html lang="zh">
<head>

	<meta charset="UTF-8">

	{{--<title>@section('title') 国内第一大数字信号处理社区 - 高品质的 DSP 开发者社区@show - Powered by DSPSTACK.com</title>--}}

	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta name="keywords" content="算法栈，数字信号处理,人工智能,算法社区,,深度学习,机器学习,傅里叶变换,小波变换,滤波器,多尺度分析,滤波器设计,python,matlab,算法,神经网络,C,C++" />
	<meta name="author" content="DSPSTACK.COM" />
	<meta name="description" content="@section('description') DSPSTACK.COM 信号处理 算法社区,又称算法栈,是国内最大的 人工智能 算法 中文社区，致力于推动 国内人工智能领域的理论研究、应用实践，并提供各方交流的学习平台，是国内最专业的 AI 社区。 @show" />
	<title>@yield('title'){{lang('site_intro')}}</title>
	<meta name="_token" content="{{ csrf_token() }}">
	<link rel="stylesheet" href="{{ cdn(elixir('assets/css/styles.css')) }}" />
	<link rel="stylesheet" href="{{ cdn(elixir('assets/css/owl.carousel.css')) }}" />
	<link rel="stylesheet" href="{{ cdn(elixir('assets/css/jquery.tocify.css')) }}" />
	<link rel="stylesheet" href="{{ cdn(elixir('assets/css/prettify.css')) }}" />
	@stack('create_edit_css')


	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">


	<link rel="canonical" href="{{config('app.url')}}" />
	<link rel="shortcut icon" href="{{ cdn('favicon1.png') }}"/>

	<script>
        Config = {
            'cdnDomain': '{{ get_cdn_domain() }}',
            'user_id': {{ $currentUser ? $currentUser->id : 0 }},
            'user_avatar': {!! $currentUser ? '"'.$currentUser->present()->gravatar() . '"' : '""' !!},
            'user_link': {!! $currentUser ? '"'. route('users.show', $currentUser->id) . '"' : '""' !!},
            'user_badge': '{{ $currentUser ? ($currentUser->present()->hasBadge() ? $currentUser->present()->badgeName() : '') : '' }}',
            'user_badge_link': "{{ $currentUser ? (route('roles.show', [$currentUser->present()->badgeID()])) : '' }}",
            'routes': {
                'notificationsCount' : '{{ route('notifications.count') }}',
                'upload_image' : '{{ route('upload_image') }}',
				'users_duration' : '{{ route('users.duration') }}'
            },
            'token': '{{ csrf_token() }}',
            'environment': '{{ app()->environment() }}',
            'following_users': [],
            'qa_category_id': '{{ config('phphub.qa_category_id') }}'
        };

        var ShowCrxHint = '{{isset($show_crx_hint) ? $show_crx_hint : 'no'}}';
	</script>

	@yield('styles')

	<meta http-equiv="x-pjax-version" content="{{ elixir('assets/css/styles.css') }}">

</head>
<body id="body" class="{{ route_class() }}">

{{-- Wechat share cover --}}
<div style="display:none">
	@section('wechat_icon')
		<img src="https://dspstack.com/uploads/images/201701/29/1/pQimFCe1r5.png">
	@show

</div>

<div id="wrap">

	@include('layouts.partials.nav')

	<div class="container main-container {{ (Request::is('blogs*') || Request::is('articles*')) || is_route('wildcard') ? 'blog-container' : '' }}">

		@if(Auth::check() && !Auth::user()->verified && !Request::is('email-verification-required'))
			<div class="alert alert-warning">
				<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
				邮箱未激活，请前往 {{ Auth::user()->email }} 查收激活邮件，激活后才能完整地使用社区功能，如发帖和回帖。未收到邮件？请前往垃圾邮件文件夹查看或 <a href="{{ route('email-verification-required') }}">重发邮件</a> 。
			</div>
		@elseif (Auth::check() && empty(Auth::user()->password) )
			<div class="alert alert-warning">
				<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
				未设置登录密码，请前往 <a href="{{ route('users.edit_password', [Auth::id()]) }}">修改密码</a> 页面进行设置。设置后将可以在移动设备上使用邮箱登录网站。
			</div>
		@endif

		@include('flash::message')
		@yield('content')

	</div>

	@include('layouts.partials.footer')

</div>



<script src="{{ cdn(elixir('assets/js/scripts.js')) }}"></script>


<script src="{{ cdn(elixir('assets/js/owl.carousel.js')) }}"></script>

@stack('create_edit_js')

<script src="{{ cdn(elixir('assets/js/katex.js')) }}"
		onload="renderMathInElement(document.body,{
			delimiters: [
				{left: '$$', right: '$$', display: true},
				{left: '$', right: '$', display: false}
			]});">
</script>

<script>
    $(document).ready(function()
    {
        //latex
        renderMathInElement(document.body, {
            // ...options...
            delimiters: [
                {left: "$$", right: "$$", display: true},
                {left: "$", right: "$", display: false}
            ]
        });

    });

    //sign
    $(function () {
        $('.sign-btn').click(function (e) {
            var _self = $(this)
            $.ajax({
                url:"{{url('/users/sign')}}",
                type:'POST',
                dataType:'json',
                data:'',
                success:function (data) {


                    if(data.status == '-1')
                    {
                        location.href = "{{route('auth.login')}}";
                        return;
                    }
                    if(data.status == '1')
                    {
                        anp(e);
                        _self.html('<i class="fa fa-user"></i> {{ lang('signed') }}');

                        return;
                    }
                }
            });
        });

        //签到效果函数
        function anp(e)
        {
            var points='5 积分';
            var $i=$("<b></b>").html("+"+points);
            var x=e.pageX,y=e.pageY;
            $i.css({top:y+50,left:x,position:"absolute",color:"#12c4c5"});
            $("body").append($i);
            $i.animate({top:y-180,opacity:0,"font-size":"10px"},3000,function(){
                $i.remove();
            });
            e.stopPropagation();
        }
    });

</script>

@stack('topic_social_share')

@stack('article_social_share')

@yield('scripts')

@if (App::environment() == 'production')
	<script>
        ga('create', '{{ getenv('GA_Tracking_ID') }}', 'auto');
        ga('send', 'pageview');
	</script>


	<script>
        // Baidu link submit
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https') {
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else {
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);

            bp = document.createElement('script');
            s = document.getElementsByTagName("script")[0];
            bp.src = "https://hm.baidu.com/hm.js?e6f6663bb8b86bc51e74f0ad37344625";
            s.parentNode.insertBefore(bp, s);
        })();

	</script>
	<!-- Global site tag (gtag.js) - Google Analytics -->
	<script async src="https://www.googletagmanager.com/gtag/js?id=UA-128908542-1"></script>
	<script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', 'UA-128908542-1');
	</script>


@endif

</body>
</html>
